package com.gyg.client;

import com.gyg.returns.RespEntity;
import com.gyg.returns.RespTable;
import com.gyg.vo.param.BanParam;
import com.gyg.vo.param.UpdateFileParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(name = "cloudDocumentClient", url = "${cloud.box.url}")
public interface CloudDocumentClient {

    /**
     * 文档列表数据
     * @param page
     * @param limit
     * @param ban
     * @param username
     * @return
     */
    @GetMapping("/cloud-document/list")
    RespTable cloudDocumentList(@RequestParam(value = "page", required = true) Integer page,
                                @RequestParam(value = "limit", required = true) Integer limit,
                                @RequestParam(value = "ban", required = true) Integer ban,
                                @RequestParam(value = "username", required = false) String username);

    /**
     * 封禁文档
     * @param banParam
     * @return
     */
    @PutMapping("/cloud-document/ban")
    RespEntity banDocument(BanParam banParam);

    /**
     * 解封文档
     * @param banParam
     * @return
     */
    @PutMapping("/cloud-document/unseal")
    RespEntity unsealDocument(BanParam banParam);

}
